SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwtPlazasConsolidadas
AS
SELECT     dbo.tb_Plazas.idPlaza AS ID, dbo.tb_Plazas.CUPOF, dbo.tb_SubOrganizaciones.Descripcion, dbo.tb_Organizaciones.Nombre, 
                      dbo.tb_Funciones.Descripcion AS Funcion, dbo.tb_Asignaturas.Descripcion AS Asignatura, dbo.tb_Divisiones.Mnemo, 
                      dbo.tb_Turnos.Descripcion AS Turno, dbo.tb_Plazas.FechaAlta, dbo.tb_Plazas.NroSecuencia, dbo.tb_Plazas.Horas, dbo.tb_Plazas.NormaCreacion, 
                      dbo.tb_Plazas.Baja, dbo.tb_Plazas.FechaBaja, dbo.tb_Plazas.UltimoDocente, dbo.tb_Plazas.NormaCierre, dbo.tb_Sistemas.Descripcion AS Sistema, 
                      dbo.tb_RegimenSalarial.Descripcion AS RegimenSalarial, dbo.tb_RegimenDeSuplencias.Descripcion AS RegimenDeSuplencia, 
                      dbo.tb_RegimenDesignaciones.Descripcion AS RegimenDesignacion, dbo.tb_RegimenLaboral.Descripcion AS RegimenLaboral, 
                      dbo.tb_Temporalidad.Descripcion AS Temporalidad, dbo.tb_Plazas.DuenoActual, dbo.tb_Plazas.SitRevDuenoActual, dbo.tb_Plazas.Horario, 
                      dbo.tb_Plazas.Paquete, dbo.tb_Plazas.EsJefeDeOrg, dbo.tb_Plazas.Observaciones, dbo.tb_Plazas.CUISE, dbo.tb_Plazas.PorcentajeSubsidio, 
                      dbo.tb_Plazas.EsCabeceraDePaquete
FROM         dbo.tb_Plazas INNER JOIN
                      dbo.tb_Funciones ON dbo.tb_Plazas.Funcion = dbo.tb_Funciones.idFuncion INNER JOIN
                      dbo.tb_Sistemas ON dbo.tb_Plazas.Sistema = dbo.tb_Sistemas.idSistema INNER JOIN
                      dbo.tb_RegimenLaboral ON dbo.tb_Plazas.RegimenLaboral = dbo.tb_RegimenLaboral.idRegimenLaboral INNER JOIN
                      dbo.tb_RegimenDeSuplencias ON dbo.tb_Plazas.RegimenSuplencias = dbo.tb_RegimenDeSuplencias.idRegimenSuplencia INNER JOIN
                      dbo.tb_Temporalidad ON dbo.tb_Plazas.Temporalidad = dbo.tb_Temporalidad.idTemporalidad LEFT OUTER JOIN
                      dbo.tb_RegimenSalarial ON dbo.tb_Plazas.RegimenSalarial = dbo.tb_RegimenSalarial.idRegimenSalarial LEFT OUTER JOIN
                      dbo.tb_RegimenDesignaciones ON dbo.tb_Plazas.RegimenDesigna = dbo.tb_RegimenDesignaciones.idRegimenDesignacion LEFT OUTER JOIN
                      dbo.tb_Turnos ON dbo.tb_Plazas.Turno = dbo.tb_Turnos.idTurno LEFT OUTER JOIN
                      dbo.tb_Asignaturas ON dbo.tb_Plazas.Asignatura = dbo.tb_Asignaturas.idAsignatura LEFT OUTER JOIN
                      dbo.tb_Divisiones ON dbo.tb_Plazas.Division = dbo.tb_Divisiones.idDivision LEFT OUTER JOIN
                      dbo.tb_Organizaciones ON dbo.tb_Plazas.Organizacion = dbo.tb_Organizaciones.idOrganizaciones LEFT OUTER JOIN
                      dbo.tb_SubOrganizaciones ON dbo.tb_Plazas.SubOrganizacion = dbo.tb_SubOrganizaciones.idSubOrganizacion
WHERE     (dbo.tb_Plazas.idPlaza = 425089)
GO
GRANT SELECT ON  [dbo].[vwtPlazasConsolidadas] TO [Direcciones De Nivel]
GRANT SELECT ON  [dbo].[vwtPlazasConsolidadas] TO [PersonalDocente]
GRANT SELECT ON  [dbo].[vwtPlazasConsolidadas] TO [PersonalDocenteDireccion]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[31] 2[10] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1 [56] 4 [18] 2))"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "tb_Plazas"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 268
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Funciones"
            Begin Extent = 
               Top = 6
               Left = 306
               Bottom = 114
               Right = 495
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Sistemas"
            Begin Extent = 
               Top = 6
               Left = 533
               Bottom = 84
               Right = 722
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenLaboral"
            Begin Extent = 
               Top = 6
               Left = 760
               Bottom = 84
               Right = 949
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenDeSuplencias"
            Begin Extent = 
               Top = 6
               Left = 987
               Bottom = 84
               Right = 1176
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Temporalidad"
            Begin Extent = 
               Top = 84
               Left = 533
               Bottom = 162
               Right = 722
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenDesignaciones"
            Begin Extent = 
               Top = 84
               Left = 760
               Bottom = 162
               Right = 9', 'USER', N'dbo', 'VIEW', N'vwtPlazasConsolidadas', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'49
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Turnos"
            Begin Extent = 
               Top = 84
               Left = 987
               Bottom = 177
               Right = 1176
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Asignaturas"
            Begin Extent = 
               Top = 114
               Left = 38
               Bottom = 222
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Divisiones"
            Begin Extent = 
               Top = 114
               Left = 265
               Bottom = 222
               Right = 454
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Organizaciones"
            Begin Extent = 
               Top = 162
               Left = 492
               Bottom = 270
               Right = 681
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_SubOrganizaciones"
            Begin Extent = 
               Top = 162
               Left = 719
               Bottom = 270
               Right = 916
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_RegimenSalarial"
            Begin Extent = 
               Top = 222
               Left = 358
               Bottom = 343
               Right = 547
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      RowHeights = 220
      Begin ColumnWidths = 32
         Width = 284
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 2850
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vwtPlazasConsolidadas', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vwtPlazasConsolidadas', NULL, NULL
GO
